﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace ChannelVN.Cached.Entity
{
    [DataContract]
    public class PageSettingItem
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public CacheSettingConstants.PageSettingType Type { get; set; }
        [DataMember]
        public string ConditionForCreateUpdateCachedUrl { get; set; }
        [DataMember]
        public string PageFile { get; set; }
        [DataMember]
        public string QueryStringFormat { get; set; }
        [DataMember]
        public CacheSettingConstants.GroupCachedKey GroupKey { get; set; }
        [DataMember]
        public string CacheNameFormat { get; set; }
        [DataMember]
        public long CacheExpire { get; set; }
        [DataMember]
        public bool EnableCache { get; set; }
        [DataMember]
        public bool EnableDynamicLayout { get; set; }
        [DataMember]
        public bool EnableViewState { get; set; }
        [DataMember]
        public string[] ExtendQueryStringForCachedUpdates { get; set; }
        [DataMember]
        public ControlSetting ControlSettings { get; set; }

        public PageSettingItem()
        {
            Name = "";
            PageFile = "";
            ConditionForCreateUpdateCachedUrl = "";
            QueryStringFormat = "";
            GroupKey = CacheSettingConstants.GroupCachedKey.NoGroup;
            CacheNameFormat = "";
            CacheExpire = 0L;
            EnableCache = false;
            EnableDynamicLayout = false;
            EnableViewState = true;
        }
    }
}
